<template>
  <div>
    <el-card style=";width: 800px;height: 400px;margin: 100px auto ;
                background-color: white">
      <div style="margin-top: 90px;margin-left: 90px">
        <img src="@/assets/imgs/success.jpg">
        <p style="float: right;line-height: 90px;margin-right: 400px">订单支付成功</p>
        <br>
      </div>
      <p style="margin-top: 30px;margin-left: 250px;color: red">{{ countTime }}秒后返回首页</p>
    </el-card>
  </div>
</template>

<script>
export default {
  name: "paySuccess",
  data() {
    return {
      countTime:"5"
    }
  },
  methods: {
    paySuccess() {
     this.countTime--;
     if(this.countTime==0){
       this.$router.push('/home');
     }
    }
  },
  mounted() {
    setInterval(this.paySuccess,1000);
  }
}
</script>

<style>
.order_lists li {
  display: inline-block;
  padding-left: 80px;
}

hr {
  margin: 0;
  padding: 0;
}
</style>